Skip to content

fix(proxy): preserve partial SOCKS response#301

Open
JSap0914 wants to merge 1 commit into
hyperium:masterfrom
JSap0914:fix/4127-preserve-partial-socks-response
Open

fix(proxy): preserve partial SOCKS response#301
JSap0914 wants to merge 1 commit into
hyperium:masterfrom
JSap0914:fix/4127-preserve-partial-socks-response

Conversation

@JSap0914

Copy link
Copy Markdown

Summary

Verification

  • Focused proxy test: cargo test --test proxy test_socks_v5_without_auth_works
  • Proxy test suite: cargo test --test proxy

buf.extend_from_slice(&tmp[..n]);

match M::try_from(buf) {
let mut message = buf.clone();

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will result in copying all the bytes. It would be better to check in the parse function if remaining has enough bytes to parse.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants